<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:f="http://xmlns.jcp.org/jsf/core"
      xmlns:p="http://primefaces.org/ui">

    <ui:composition>

        <p:dialog id="DetalleValorCreateDlg" widgetVar="DetalleValorCreateDialog" modal="true" resizable="false" appendTo="@(body)" header="#{bundle.CreateDetalleValorTitle}">
            <h:form id="DetalleValorCreateForm">
                <h:panelGroup id="display">
                    <p:panelGrid columns="2" rendered="#{detalleValorController.selected != null}">
                        <p:outputLabel value="#{bundle.CreateDetalleValorLabel_idDetalleValor}" for="idDetalleValor" />
                        <p:inputText id="idDetalleValor" value="#{detalleValorController.selected.idDetalleValor}" title="#{bundle.CreateDetalleValorTitle_idDetalleValor}" required="true" requiredMessage="#{bundle.CreateDetalleValorRequiredMessage_idDetalleValor}"/>
                        <p:outputLabel value="#{bundle.CreateDetalleValorLabel_valorComponente}" for="valorComponente" />
                        <p:inputText id="valorComponente" value="#{detalleValorController.selected.valorComponente}" title="#{bundle.CreateDetalleValorTitle_valorComponente}" />
                        <p:outputLabel value="#{bundle.CreateDetalleValorLabel_idCabeceraValor}" for="idCabeceraValor" />
                        <p:selectOneMenu id="idCabeceraValor" value="#{detalleValorController.selected.idCabeceraValor}" >
                            <f:selectItems value="#{cabeceraValorController.itemsAvailableSelectOne}"
                                           var="idCabeceraValorItem"
                                           itemValue="#{idCabeceraValorItem}"/>
                        </p:selectOneMenu>
                        <p:outputLabel value="#{bundle.CreateDetalleValorLabel_idComponenteFormula}" for="idComponenteFormula" />
                        <p:selectOneMenu id="idComponenteFormula" value="#{detalleValorController.selected.idComponenteFormula}" required="true" requiredMessage="#{bundle.EditDetalleValorRequiredMessage_idComponenteFormula}">
                            <f:selectItems value="#{componenteFormulaController.itemsAvailableSelectOne}"
                                           var="idComponenteFormulaItem"
                                           itemValue="#{idComponenteFormulaItem}"/>
                        </p:selectOneMenu>
                    </p:panelGrid>
                    <p:commandButton actionListener="#{detalleValorController.create}" value="#{bundle.Save}" update="display,:DetalleValorListForm:datalist,:growl" oncomplete="handleSubmit(args,'DetalleValorCreateDialog');"/>
                    <p:commandButton value="#{bundle.Cancel}" onclick="DetalleValorCreateDialog.hide()"/>
                </h:panelGroup>
            </h:form>
        </p:dialog>

    </ui:composition>
</html>
